3.1.19 \(\int \frac {3-x+2 x^2}{2+3 x+5 x^2} \, dx\) [19]

Optimal. Leaf size=42 \[ \frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {3+10 x}{\sqrt {31}}\right )}{25 \sqrt {31}}-\frac {11}{50} \log \left (2+3 x+5 x^2\right ) \]

[Out]

2/5*x-11/50*ln(5*x^2+3*x+2)+143/775*arctan(1/31*(3+10*x)*31^(1/2))*31^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {1671, 648, 632, 210, 642} \begin {gather*} \frac {143 \text {ArcTan}\left (\frac {10 x+3}{\sqrt {31}}\right )}{25 \sqrt {31}}-\frac {11}{50} \log \left (5 x^2+3 x+2\right )+\frac {2 x}{5} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2),x]

[Out]

(2*x)/5 + (143*ArcTan[(3 + 10*x)/Sqrt[31]])/(25*Sqrt[31]) - (11*Log[2 + 3*x + 5*x^2])/50

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1671

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {3-x+2 x^2}{2+3 x+5 x^2} \, dx &=\int \left (\frac {2}{5}+\frac {11 (1-x)}{5 \left (2+3 x+5 x^2\right )}\right ) \, dx\\ &=\frac {2 x}{5}+\frac {11}{5} \int \frac {1-x}{2+3 x+5 x^2} \, dx\\ &=\frac {2 x}{5}-\frac {11}{50} \int \frac {3+10 x}{2+3 x+5 x^2} \, dx+\frac {143}{50} \int \frac {1}{2+3 x+5 x^2} \, dx\\ &=\frac {2 x}{5}-\frac {11}{50} \log \left (2+3 x+5 x^2\right )-\frac {143}{25} \text {Subst}\left (\int \frac {1}{-31-x^2} \, dx,x,3+10 x\right )\\ &=\frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {3+10 x}{\sqrt {31}}\right )}{25 \sqrt {31}}-\frac {11}{50} \log \left (2+3 x+5 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 42, normalized size = 1.00 \begin {gather*} \frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {3+10 x}{\sqrt {31}}\right )}{25 \sqrt {31}}-\frac {11}{50} \log \left (2+3 x+5 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2),x]

[Out]

(2*x)/5 + (143*ArcTan[(3 + 10*x)/Sqrt[31]])/(25*Sqrt[31]) - (11*Log[2 + 3*x + 5*x^2])/50

________________________________________________________________________________________

Maple [A]
time = 0.22, size = 34, normalized size = 0.81

method result size
default \(\frac {2 x}{5}-\frac {11 \ln \left (5 x^{2}+3 x +2\right )}{50}+\frac {143 \arctan \left (\frac {\left (3+10 x \right ) \sqrt {31}}{31}\right ) \sqrt {31}}{775}\) \(34\)
risch \(\frac {2 x}{5}-\frac {11 \ln \left (100 x^{2}+60 x +40\right )}{50}+\frac {143 \arctan \left (\frac {\left (3+10 x \right ) \sqrt {31}}{31}\right ) \sqrt {31}}{775}\) \(34\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2-x+3)/(5*x^2+3*x+2),x,method=_RETURNVERBOSE)

[Out]

2/5*x-11/50*ln(5*x^2+3*x+2)+143/775*arctan(1/31*(3+10*x)*31^(1/2))*31^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.52, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="maxima")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

Fricas [A]
time = 4.10, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="fricas")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 49, normalized size = 1.17 \begin {gather*} \frac {2 x}{5} - \frac {11 \log {\left (x^{2} + \frac {3 x}{5} + \frac {2}{5} \right )}}{50} + \frac {143 \sqrt {31} \operatorname {atan}{\left (\frac {10 \sqrt {31} x}{31} + \frac {3 \sqrt {31}}{31} \right )}}{775} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-x+3)/(5*x**2+3*x+2),x)

[Out]

2*x/5 - 11*log(x**2 + 3*x/5 + 2/5)/50 + 143*sqrt(31)*atan(10*sqrt(31)*x/31 + 3*sqrt(31)/31)/775

________________________________________________________________________________________

Giac [A]
time = 3.98, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="giac")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

Mupad [B]
time = 3.39, size = 35, normalized size = 0.83 \begin {gather*} \frac {2\,x}{5}-\frac {11\,\ln \left (5\,x^2+3\,x+2\right )}{50}+\frac {143\,\sqrt {31}\,\mathrm {atan}\left (\frac {10\,\sqrt {31}\,x}{31}+\frac {3\,\sqrt {31}}{31}\right )}{775} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2 - x + 3)/(3*x + 5*x^2 + 2),x)

[Out]

(2*x)/5 - (11*log(3*x + 5*x^2 + 2))/50 + (143*31^(1/2)*atan((10*31^(1/2)*x)/31 + (3*31^(1/2))/31))/775

________________________________________________________________________________________